﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sistema.IDAO;
using Sistema.Dominio;

namespace Sistema.DAO.Nhibernate
{
    public static class NhibernateDaoFactory
    {
        public static T GetReference<T>() where T : IBaseObjDados
        {
            switch (typeof(T).ToString())
            {
                case "Sistema.IDAO.IUsuarioDAO": return ((T)(IBaseObjDados)new DAO.UsuarioDAONHibernate());
                case "Sistema.IDAO.INFeInfoDAO": return ((T)(IBaseObjDados)new DAO.NFeInfoDAONHibernate());
                case "Sistema.IDAO.IEmpresaInfoDAO": return ((T)(IBaseObjDados)new DAO.EmpresaInfoDAONHibernate());
                default: throw new NotImplementedException();
            }
        }
    }
}
